<!DOCTYPE html>
<html lang="<?php echo lang('header_doc_lang') ?>"> 
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title><?php echo $title ?></title>
        <?php
        $this->assets->css('admin/jquery/jquery.ui.all.css');
        $this->assets->css('admin/table_data.css');
        $this->assets->css('admin/lightbox/style.css');
        $this->assets->display('css');
        ?>
        <link rel="stylesheet" type="text/css" href="<?php echo theme_url() ?>admin/style.css" title="style_red" media="screen"/>
        <link rel="alternate stylesheet" type="text/css" href="<?php echo theme_url() ?>admin/style_green.css" title="style_green" media="screen" />
        <link rel="alternate stylesheet" type="text/css" href="<?php echo theme_url() ?>admin/style_blue.css" title="style_blue" media="screen" />
        <link rel="alternate stylesheet" type="text/css" href="<?php echo theme_url() ?>admin/style_purple.css" title="style_purple" media="screen" />

<!--[if IE]><script type="text/javascript" src="js/excanvas.js"></script><![endif]-->
        <?php
        $this->assets->js('admin/jquery-1.4.2.js');
        $this->assets->js('admin/jquery-ui-1.8.2.js');
        $this->assets->js('admin/jquery.fancybox-1.3.2.js');
        $this->assets->js('admin/jquery.validate.js');
        $this->assets->js('admin/jquery.wysiwyg.js');
        $this->assets->js('admin/jquery.dataTables.js');
        $this->assets->js('admin/jquery.flot.js');
        $this->assets->js('admin/jquery.flot.stack.js');
        $this->assets->js('admin/styleswitch.js');
        $this->assets->js('admin/custom.js');
        $this->assets->display('js');
        ?>

    </head>
    <body>

        <div id="wrapper">

            <ul id="topbar">
                <li class="logo"><strong>IMG</strong>Igniter Admin Panel</li>
                <li class="s_1"></li>
                <li class="breadcrumb"><?php echo set_breadcrumb(); ?></li>

                <li class="fr"><?php echo anchor('admin/logout', '<span class="icon_text logout"></span>' . lang('g_logout'), array('class' => 'button red fl', 'title' => 'logout',)) ?></li>
                <li class="s_1 fr"></li>
                <li class="fr"><a class="button white fl" title="unread mail" href="#"><span class="icon_text mail"></span>0</a></li>
                <li class="s_1 fr"></li>
                <li class="fr"><a class="button white fl" title="<?php echo $this->session->userdata('username') ?>" href="#"><span class="icon_text admin"></span><?php echo $this->session->userdata('username') ?></a></li>
                <li class="fr"><a id="logged">Logged in as</a></li>
                <li class="clear"></li>
            </ul>

            <ul id="navbar">
                <li <?php echo ($this->uri->segment(2) == '') ? 'class="active"' : '' ?>>
                    <?php echo anchor('admin', '<span class="icon_text dashboard"></span>' . lang('admin_dashboard')); ?>
                    <ul>
                    </ul>
                </li>
                <li <?php echo ($this->uri->segment(2) == 'b') ? 'class="active"' : '' ?>><a href="#"><span class="icon_text design"></span>design</a></li>
                <li <?php echo ($this->uri->segment(2) == 'users') ? 'class="active"' : '' ?>>
                    <?php echo anchor('admin/users', '<span class="icon_text users"></span>' . lang('admin_users')); ?>
                    <ul>
                        <li><?php echo anchor('admin/users/usergroups', lang('admin_usergroups'), array('class' => 'subbutton white'));?></li>
                    </ul>
                </li>
                <li <?php echo ($this->uri->segment(2) == 'images') ? 'class="active"' : '' ?>>
                    <?php echo anchor('admin/images', '<span class="icon_text media"></span>' . lang('admin_images')); ?>
                    <ul>
                    </ul>
                </li>
                <li <?php echo ($this->uri->segment(2) == 'a') ? 'class="active"' : '' ?>><a href="#"><span class="icon_text comment"></span>comment</a></li>
                <li <?php echo ($this->uri->segment(2) == 'a') ? 'class="active"' : '' ?>><a href="#"><span class="icon_text stats"></span>stats</a></li>
                <li <?php echo ($this->uri->segment(2) == 'settings') ? 'class="active"' : '' ?>>
                    <?php echo anchor('admin/settings', '<span class="icon_text settings"></span>' . lang('admin_system_settings')); ?>
                    <ul>
                        <li><?php echo anchor('admin/database', lang('admin_database'), array('class' => 'subbutton white')); ?></li>
                    </ul>
                </li>
            </ul>
            <div id="subnavbar">
                <form id="search_form" method="post" action="">
                    <input type="text" name="search_input" value="Search..." id="search_input" class="fl" />
                </form>
            </div>

            <div id="content">
                <?php
                echo $this->message->display();
                echo $contents;
                ?>
            </div>
        </div>

        <div id="footer">
            <p class="copy fl">Copyright 2011<strong> IMG</strong>Igniter. All rights reserved.</p>
            <ul class="button language_button white fr">
                <li class="icon_single language fl"></li>
                <li class="flag en fl"></li>
                <li class="flag es fl"></li>
                <li class="flag de fl"></li>
                <li class="flag it fl"></li>
                <li class="clear"></li>
            </ul>

            <ul class="skinner fr">
                <li class="fl"><a href="#" rel="style_blue" class="styleswitch skin skin_blue fl"></a></li>
                <li class="fl"><a href="#" rel="style_green" class="styleswitch skin skin_green fl"></a></li>
                <li class="fl"><a href="#" rel="style_red" class="styleswitch skin skin_red fl"></a></li>
                <li class="fl"><a href="#" rel="style_purple" class="styleswitch skin skin_purple fl"></a></li>
                <li class="clear"></li>
            </ul>
        </div>
    </body>
</html>